package com.ufox.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ufox.entity.Student;
import com.ufox.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 优狐科技-www.hbufox.com
 * @since 2023-01-29
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private IStudentService studentService;

    @GetMapping
    public Page<Student> getByPage(Integer pageNum, Integer pageSize){

        Page<Student> page = new Page<>(pageNum,pageSize);
        studentService.page(page);
        return page;
    }

}

